Skip to main content

left

Type​

property

Summary​

Specifies how far an object's left edge is from the left edge of the window or screen.

Syntax​

set the left of <object> to <numberOfPixels>

Description​

Use the left property to change the horizontal placement of a control or window.

The left of a stack is in absolute (screen) coordinates(glossary). The left of a card is always zero; setting the left of a card does not cause a script error, but it has no effect. The left of a group or control is in relative (window) coordinates(glossary).

Changing the left of an object shifts it to the new position without resizing it. To change an object's width, set its width or rectangle property.

The width property of an object is equal to its right minus its left.

Examples​

set the left of graphic 3 to the left of graphic 2
set the left of this stack to 128

Value​

NameTypeDescription

value

The left of an object is an integer. A negative integer indicates that the position is to the left of the left edge of the screen or card (and therefore cannot be seen). A stack's left is the distance in pixels from the left edge of the screen to the left edge of the stack window.

A card's or control's left is the distance in pixels from the left edge of the card to the left edge of the card or control.

keyword: control, integer, rectangle, card

object: stack

property: leftMargin, pixels, right, width, bottomLeft, xOffset, hotSpot, topLeft

command: group

constant: right

glossary: object, property, relative coordinates, absolute coordinates, error, negative, stack window

Compatibility and Support​

Introduced

LiveCode 1.0

OS

mac

windows

linux

ios

android

Platforms

desktop

server

mobile

Thank you for your feedback!

Was this page helpful?